/*------------------------------
 *hfile:      Vge_PLineObj.h             
 *Created Date:  4/23/2001             
 *Developer:  Stephen.Yao              
 *Studio:	 Zhuq Studio			  
 *------------------------------
 */
#ifndef CCGISPLINEOBJ__H__INTERFACE
#define CCGISPLINEOBJ__H__INTERFACE
#include "Vge_MStruct.h"

namespace ccgis{

class AFX_EXT_CLASS CcgisPLineObj  
{
public:
	STATUS ploQuerySmCode( char ploTabName[MAX_NAME],char code[MAX_CODE],CcgisIds &ids,BOOL bUpdate = TRUE,BOOL bWait = FALSE );
	STATUS ploRectQueryIds1( char ploTabName[MAX_NAME],float minx,float miny,float maxx,float maxy,CStringArray &codes,CcgisIds &ids,BOOL bUpdate = TRUE,BOOL bWait = FALSE );
	STATUS ploRectQueryIds2( char ploTabName[MAX_NAME],float minx,float miny,float maxx,float maxy,CStringArray &codes,CcgisIds &ids,BOOL bUpdate = TRUE,BOOL bWait = FALSE );
	STATUS ploRectQueryIds3( char ploTabName[MAX_NAME],float minx,float miny,float maxx,float maxy,CStringArray &codes,CcgisIds &ids,BOOL bUpdate = FALSE,BOOL bWait = FALSE );

	STATUS ploRectQueryIds1( char ploTabName[MAX_NAME],float minx,float miny,float maxx,float maxy,CcgisIds &ids,BOOL bUpdate = TRUE,BOOL bWait = FALSE );
	STATUS ploRectQueryIds2( char ploTabName[MAX_NAME],float minx,float miny,float maxx,float maxy,CcgisIds &ids,BOOL bUpdate = TRUE,BOOL bWait = FALSE );
	STATUS ploRectQueryIds3( char ploTabName[MAX_NAME],float minx,float miny,float maxx,float maxy,CcgisIds &ids,BOOL bUpdate = FALSE,BOOL bWait = FALSE );

	STATUS ploPolygonQuery( char ploTabName[MAX_NAME], _ccgisPoint2D *polyPts, int len, CStringArray &codes, CcgisIds &lids, int queryType = 1 );//1: QT_CONTAIN 2: QT_INTERSECT
	STATUS ploLineQuery( char ploTabName[MAX_NAME], _ccgisPoint2D *linePts, int len, CStringArray &codes, CcgisIds &lids );
	STATUS ploPtQuery( char ploTabName[MAX_NAME], float ptx, float pty, float ptz, float torlerance, CStringArray &codes, CcgisIds &lids );

	STATUS ploPolygonQuery( char ploTabName[MAX_NAME], _ccgisPoint2D *polyPts, int len, CcgisIds &lids, int queryType = 1 );//1: QT_CONTAIN 2: QT_INTERSECT
	STATUS ploLineQuery( char ploTabName[MAX_NAME], _ccgisPoint2D *linePts, int len, CcgisIds &lids );
	STATUS ploPtQuery( char ploTabName[MAX_NAME], float ptx, float pty, float ptz, float torlerance, CcgisIds &lids );
	
	STATUS ploGetAllCode( char ploTabName[MAX_NAME],CStringArray &allcodes,int &len );
	STATUS ploGetAllCode( CStringArray &allcodes,int &len );
	STATUS ploSetLMaterial( char ploTabName[MAX_NAME],OIDTYPE lid,char lmaterial[MAX_NAME] );
	STATUS ploGetLMaterial( char ploTabName[MAX_NAME],OIDTYPE lid,char lmaterial[MAX_NAME],BOOL bUpdate = TRUE,BOOL bWait = FALSE );
	STATUS ploSetLRadius( char ploTabName[MAX_NAME],OIDTYPE lid,float lradius );
	STATUS ploGetLRadius( char ploTabName[MAX_NAME],OIDTYPE lid,float &lradius,BOOL bUpdate = TRUE,BOOL bWait = FALSE );
	STATUS ploClrTab( char ploTabName[MAX_NAME] );
	STATUS ploInsertAPLine( char ploTabName[MAX_NAME],CcgisPloData ploData );
	STATUS ploDelARec( char ploTabName[MAX_NAME],OIDTYPE lid );
	STATUS ploGetALine( char ploTabName[MAX_NAME],OIDTYPE lid,CcgisPloData &ploData,BOOL bUpdate = TRUE,BOOL bWait = FALSE );
	STATUS ploGetColor( char ploTabName[MAX_NAME],OIDTYPE lid,float &colorR,float &colorG,float &colorB,BOOL bUpdate = TRUE,BOOL bWait = FALSE );
	STATUS ploSetColor( char ploTabName[MAX_NAME],OIDTYPE lid,float colorR,float colorG,float colorB );
	STATUS ploInsertMetaData( char ploTabName[MAX_NAME],float minx,float miny,float maxx,float maxy,float tolerance );
	STATUS ploDelMetaData( char ploTabName[MAX_NAME] );
	STATUS ploCreateIndex( char ploTabName[MAX_NAME],int level );
	STATUS ploDeleteIndex( char sloTabName[MAX_NAME] );
	STATUS ploRectQuery1( char ploTabName[MAX_NAME],float minx,float miny,float maxx,float maxy,CcgisPloData *&PLines,int &len,BOOL bUpdate = TRUE,BOOL bWait = FALSE );
	STATUS ploRectQuery2( char ploTabName[MAX_NAME],float minx,float miny,float maxx,float maxy,CcgisPloData *&PLines,int &len,BOOL bUpdate = TRUE,BOOL bWait = FALSE );
	STATUS ploRectQuery3( char ploTabName[MAX_NAME],float minx,float miny,float maxx,float maxy,CcgisPloData *&PLines,int &len,BOOL bUpdate = FALSE,BOOL bWait = FALSE );
	STATUS ploRectCodeQuery1( char ploTabName[MAX_NAME],float minx,float miny,float maxx,float maxy,CStringArray &codes,CcgisPloData *&PLines,int &len,BOOL bUpdate = FALSE,BOOL bWait = FALSE );
	STATUS ploRectCodeQuery2( char ploTabName[MAX_NAME],float minx,float miny,float maxx,float maxy,CStringArray &codes,CcgisPloData *&PLines,int &len,BOOL bUpdate = FALSE,BOOL bWait = FALSE );
	STATUS ploRectCodeQuery3( char ploTabName[MAX_NAME],float minx,float miny,float maxx,float maxy,CStringArray &codes,CcgisPloData *&PLines,int &len,BOOL bUpdate = FALSE,BOOL bWait = FALSE );
	STATUS ploGetLineData( char ploTabName[MAX_NAME],OIDTYPE lid,_ccgisPoint3D *&lineData,int &ptNum,BOOL bUpdate = TRUE,BOOL bWait = FALSE );
	STATUS ploGetVisFlag( char ploTabName[MAX_NAME],OIDTYPE lid,char &visFlag,BOOL bUpdate = TRUE,BOOL bWait = FALSE );
	STATUS ploSetVisFlag( char ploTabName[MAX_NAME],OIDTYPE lid,char visFlag );
	STATUS ploSetFeaName( char ploTabName[MAX_NAME],int lid,char feaname[MAX_NAME]);
	STATUS ploGetFeaName( char ploTabName[MAX_NAME],int lid,char feaname[MAX_NAME]);
	STATUS ploSetPid( char ploTabName[MAX_NAME],int lid,int pid);
	STATUS ploGetPid( char ploTabName[MAX_NAME],int lid,int &pid);
	STATUS ploGetCode( char ploTabName[MAX_NAME],OIDTYPE lid,char code[MAX_CODE],BOOL bUpdate = TRUE,BOOL bWait = FALSE );
	STATUS ploSetCode( char ploTabName[MAX_NAME],OIDTYPE lid,char newCode[MAX_CODE] );
	STATUS ploGetMinMax( char ploTabName[MAX_NAME],float &minx,float &miny,float &maxx,float &maxy );
	STATUS ploUpdateALine( char ploTabName[MAX_NAME],CcgisPloData ploData );
	STATUS ploSetInfId( char ploTabName[MAX_NAME],OIDTYPE lid,OIDTYPE infId );
	STATUS ploGetInfId( char ploTabName[MAX_NAME],OIDTYPE lid,OIDTYPE &infId,BOOL bUpdate = TRUE,BOOL bWait = FALSE );
};

}

#endif
